package com.lb.sssq.util;

import org.apache.log4j.Logger;

public class Arrays {
	private static final Logger logger = Logger.getLogger(Arrays.class);
	
	/**
	 * 数组转换成字符串(不带[])
	 * @param a
	 * @return
	 */
	public static String toString(Object[] a) {
        if (a == null)
            return "null";
        int iMax = a.length - 1;
        if (iMax == -1)
            return "[]";

        StringBuilder b = new StringBuilder();
        for (int i = 0; ; i++) {
            b.append(String.valueOf(a[i]));
            if (i == iMax)
		return b.toString();
	    b.append(",");
        }
    }

}
